# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[return self.selected.url
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770a9ec>}
nname: 0
n 0(None)[return self.selected.name
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770aa0c>}
nname: 0
n 0(None)[return self.selected.url
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770abac>}
nname: 0
n 0(None)[Player.__init__(self, type)
self.eventhandler = WebBrowserEventHandler(self)
def self._getitems_keywords['url_path']():
	return self.selected.url

def self._getitems_keywords['url_name']():
	return self.selected.name

def self._getitems_keywords['browser_display']():
	return self.selected.url

self._WebBrowser__banner_timer = None
self._nav = None
self.bookmarks = []
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76fffac>}
nname: 29
n 29(None)[louie_send('update', value=url, sender=self)
return None
]:
	i: 12(), 28()
	o: 

nname: 28
n 28(None)[]:
	i: 0(f)
	o: 29()

nname: 12
n 12(None)[url = self.selected.url
]:
	i: 0(t)
	o: 29()

nname: 0
n 0(url is None)[]:
	i: 
	o: 12(t), 28(f)

nname: 0
n 0(None)[if url is None:
	url = self.selected.url
louie_send('update', value=url, sender=self)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffd0c>}
nname: 0
n 0(None)[louie_send('on_hide_banner', sender=self)
self._WebBrowser__banner_timer = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb770a8ac>}
nname: 79
n 79(None)[self._WebBrowser__banner_timer.start(config.HMI_VIDEO.get('banner_period', 5))
return None
]:
	i: 30(), 65()
	o: 

nname: 65
n 65(None)[self._WebBrowser__banner_timer.stop()
]:
	i: 0(f)
	o: 79()

nname: 30
n 30(None)[self._WebBrowser__banner_timer = Task(stop_banner_timer)
louie_send('on_show_banner', sender=self)
]:
	i: 0(t)
	o: 79()

nname: 0
n 0(self._WebBrowser__banner_timer is None)[def stop_banner_timer():
	louie_send('on_hide_banner', sender=self)
	self._WebBrowser__banner_timer = None
	return None

]:
	i: 
	o: 30(t), 65(f)

nname: 0
n 0(None)[def stop_banner_timer():
	louie_send('on_hide_banner', sender=self)
	self._WebBrowser__banner_timer = None
	return None

if self._WebBrowser__banner_timer is None:
	self._WebBrowser__banner_timer = Task(stop_banner_timer)
	louie_send('on_show_banner', sender=self)
else:
	self._WebBrowser__banner_timer.stop()
self._WebBrowser__banner_timer.start(config.HMI_VIDEO.get('banner_period', 5))
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffccc>}
nname: 114
n 114(None)[return None
]:
	i: 15(), 100()
	o: 

nname: 100
n 100(None)[self.stack.toggle()
]:
	i: 0(f)
	o: 114()

nname: 15
n 15(None)[from pygui.menu.menu.web import URLNavigatorMenu
self._nav = URLNavigatorMenu(_('URL navigator menu'), urls=self.choices, type='url_navigator', universe=self.universe)
pygui_globs['menustack'].push_menu(self._nav)
]:
	i: 0(t)
	o: 114()

nname: 0
n 0(self._nav is None)[]:
	i: 
	o: 15(t), 100(f)

nname: 0
n 0(None)[if self._nav is None:
	from pygui.menu.menu.web import URLNavigatorMenu
	self._nav = URLNavigatorMenu(_('URL navigator menu'), urls=self.choices, type='url_navigator', universe=self.universe)
	pygui_globs['menustack'].push_menu(self._nav)
else:
	self.stack.toggle()
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffd6c>}
nname: 0
n 0(None)[louie_send('browser_display', sender=self, action=action_name)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffb6c>}
nname: 0
n 0(None)[louie_send('browser_display', sender=self, action='insert_char', value=char_value)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffa8c>}
nname: 0
n 0(None)[item = URLItem('', url='', menu=self)
louie_send('browser_display', sender=self, action='get_page_info', value=item)
self.bookmarks.append(item)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ffe8c>}
nname: 6
n 6(None)[__doc__ = '\n    WebBrowser interface.\n    '
def __init__(self, type='webbrowser'):
	Player.__init__(self, type)
	self.eventhandler = WebBrowserEventHandler(self)
	def self._getitems_keywords['url_path']():
		return self.selected.url

	def self._getitems_keywords['url_name']():
		return self.selected.name

	def self._getitems_keywords['browser_display']():
		return self.selected.url

	self._WebBrowser__banner_timer = None
	self._nav = None
	self.bookmarks = []
	return None

def load_url(self, url=None):
	if url is None:
		url = self.selected.url
	louie_send('update', value=url, sender=self)
	return None

def activate_url_banner_timer(self):
	def stop_banner_timer():
		louie_send('on_hide_banner', sender=self)
		self._WebBrowser__banner_timer = None
		return None

	if self._WebBrowser__banner_timer is None:
		self._WebBrowser__banner_timer = Task(stop_banner_timer)
		louie_send('on_show_banner', sender=self)
	else:
		self._WebBrowser__banner_timer.stop()
	self._WebBrowser__banner_timer.start(config.HMI_VIDEO.get('banner_period', 5))
	return None

def toggle_menu(self):
	if self._nav is None:
		from pygui.menu.menu.web import URLNavigatorMenu
		self._nav = URLNavigatorMenu(_('URL navigator menu'), urls=self.choices, type='url_navigator', universe=self.universe)
		pygui_globs['menustack'].push_menu(self._nav)
	else:
		self.stack.toggle()
	return None

play = selective_gui_updater('url_path', 'url_name', 'browser_display')()
select = selective_gui_updater('url_path', 'url_name', 'browser_display')()
def browse_action(self, action_name):
	louie_send('browser_display', sender=self, action=action_name)

def insert_char(self, char_value):
	louie_send('browser_display', sender=self, action='insert_char', value=char_value)

def bookmark_current(self):
	item = URLItem('', url='', menu=self)
	louie_send('browser_display', sender=self, action='get_page_info', value=item)
	self.bookmarks.append(item)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76ff2ac>}
nname: 0
n 0(None)[from __future__ import absolute_import
from pygui.eventmanager.players import WebBrowserEventHandler
from ..menu.web import URLNavigatorMenu
from pygui.item.web import URLItem
from .core import Player
from pygui.menu import selective_gui_updater
from peewee.debug import DEBUG, PRINT_EXCEPTION, GET_LOGGER
from peewee.messages import send as louie_send
from peewee.notifier import Task
from pygui.shared import pygui_globs
import pygui.config as config
log = GET_LOGGER(__name__)
class WebBrowser(Player):
	__doc__ = '\n    WebBrowser interface.\n    '
	def __init__(self, type='webbrowser'):
		Player.__init__(self, type)
		self.eventhandler = WebBrowserEventHandler(self)
		def self._getitems_keywords['url_path']():
			return self.selected.url

		def self._getitems_keywords['url_name']():
			return self.selected.name

		def self._getitems_keywords['browser_display']():
			return self.selected.url

		self._WebBrowser__banner_timer = None
		self._nav = None
		self.bookmarks = []
		return None

	def load_url(self, url=None):
		if url is None:
			url = self.selected.url
		louie_send('update', value=url, sender=self)
		return None

	def activate_url_banner_timer(self):
		def stop_banner_timer():
			louie_send('on_hide_banner', sender=self)
			self._WebBrowser__banner_timer = None
			return None

		if self._WebBrowser__banner_timer is None:
			self._WebBrowser__banner_timer = Task(stop_banner_timer)
			louie_send('on_show_banner', sender=self)
		else:
			self._WebBrowser__banner_timer.stop()
		self._WebBrowser__banner_timer.start(config.HMI_VIDEO.get('banner_period', 5))
		return None

	def toggle_menu(self):
		if self._nav is None:
			from pygui.menu.menu.web import URLNavigatorMenu
			self._nav = URLNavigatorMenu(_('URL navigator menu'), urls=self.choices, type='url_navigator', universe=self.universe)
			pygui_globs['menustack'].push_menu(self._nav)
		else:
			self.stack.toggle()
		return None

	play = selective_gui_updater('url_path', 'url_name', 'browser_display')()
	select = selective_gui_updater('url_path', 'url_name', 'browser_display')()
	def browse_action(self, action_name):
		louie_send('browser_display', sender=self, action=action_name)

	def insert_char(self, char_value):
		louie_send('browser_display', sender=self, action='insert_char', value=char_value)

	def bookmark_current(self):
		item = URLItem('', url='', menu=self)
		louie_send('browser_display', sender=self, action='get_page_info', value=item)
		self.bookmarks.append(item)



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76f9bec>}
from __future__ import absolute_import
from pygui.eventmanager.players import WebBrowserEventHandler
from ..menu.web import URLNavigatorMenu
from pygui.item.web import URLItem
from .core import Player
from pygui.menu import selective_gui_updater
from peewee.debug import DEBUG, PRINT_EXCEPTION, GET_LOGGER
from peewee.messages import send as louie_send
from peewee.notifier import Task
from pygui.shared import pygui_globs
import pygui.config as config
log = GET_LOGGER(__name__)
class WebBrowser(Player):
	__doc__ = '\n    WebBrowser interface.\n    '
	def __init__(self, type='webbrowser'):
		Player.__init__(self, type)
		self.eventhandler = WebBrowserEventHandler(self)
		def self._getitems_keywords['url_path']():
			return self.selected.url

		def self._getitems_keywords['url_name']():
			return self.selected.name

		def self._getitems_keywords['browser_display']():
			return self.selected.url

		self._WebBrowser__banner_timer = None
		self._nav = None
		self.bookmarks = []
		return None

	def load_url(self, url=None):
		if url is None:
			url = self.selected.url
		louie_send('update', value=url, sender=self)
		return None

	def activate_url_banner_timer(self):
		def stop_banner_timer():
			louie_send('on_hide_banner', sender=self)
			self._WebBrowser__banner_timer = None
			return None

		if self._WebBrowser__banner_timer is None:
			self._WebBrowser__banner_timer = Task(stop_banner_timer)
			louie_send('on_show_banner', sender=self)
		else:
			self._WebBrowser__banner_timer.stop()
		self._WebBrowser__banner_timer.start(config.HMI_VIDEO.get('banner_period', 5))
		return None

	def toggle_menu(self):
		if self._nav is None:
			from pygui.menu.menu.web import URLNavigatorMenu
			self._nav = URLNavigatorMenu(_('URL navigator menu'), urls=self.choices, type='url_navigator', universe=self.universe)
			pygui_globs['menustack'].push_menu(self._nav)
		else:
			self.stack.toggle()
		return None

	play = selective_gui_updater('url_path', 'url_name', 'browser_display')()
	select = selective_gui_updater('url_path', 'url_name', 'browser_display')()
	def browse_action(self, action_name):
		louie_send('browser_display', sender=self, action=action_name)

	def insert_char(self, char_value):
		louie_send('browser_display', sender=self, action='insert_char', value=char_value)

	def bookmark_current(self):
		item = URLItem('', url='', menu=self)
		louie_send('browser_display', sender=self, action='get_page_info', value=item)
		self.bookmarks.append(item)



